module.exports = {
  apps: [
    {
      name: 'environmental-api',
      script: 'venv/bin/python',
      args: '-m uvicorn app.main:app --host 0.0.0.0 --port 8001',
      cwd: '/var/www/environmental-consulting/backend',
      env: {
        NODE_ENV: 'production',
        DATABASE_URL: 'sqlite:///./environmental_consulting.db',
        SECRET_KEY: 'gzqhsz-environmental-consulting-super-secret-key-2024-production',
        DEBUG: 'false',
        HOST: '0.0.0.0',
        PORT: '8001',
        FRONTEND_URL: 'https://gzqhst.com',
        PYTHONPATH: '/var/www/environmental-consulting/backend'
      },
      instances: 1,
      exec_mode: 'fork',
      watch: false,
      max_memory_restart: '1G',
      autorestart: true,
      error_file: '/var/www/environmental-consulting/logs/api-error.log',
      out_file: '/var/www/environmental-consulting/logs/api-out.log',
      log_file: '/var/www/environmental-consulting/logs/api-combined.log',
      time: true
    }
  ]
};
